package com.linsen.erp.admin.controller;


import com.linsen.erp.admin.provider.qo.OperationLogQo;
import com.linsen.erp.admin.provider.vo.OperationLogVO;
import com.linsen.erp.admin.service.IOperationLogService;
import com.linsen.core.common.util.Result;
import com.linsen.core.mybatisplus.util.PageUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 操作日志 前端控制器
 * </p>
 *
 * @author zhaoyong
 * @since 2023-07-24
 */
@RestController
@RequestMapping("/admin/operation-log")
@RequiredArgsConstructor
@Api(tags = "操作日志")
public class OperationLogController {
    private final IOperationLogService iOperationLogService;

    //@SaCheckPermission("admin:operation-log:page")
    @PostMapping("/page")
    @ApiOperation(value = "分页查询",response = OperationLogVO.class)
    public Result page(@RequestBody OperationLogQo operationLogQo) {
        return Result.data(PageUtil.convert(this.iOperationLogService.page(operationLogQo),OperationLogVO.class));
    }
}
